<?php

namespace app\admin\model;
use think\Model;

/**
 *  配置分类
 */
class Config extends Model
{
    public function configValue()
    {
        return $this->hasMany('ConfigValue','config_id','config_id');
    }



    public static function getValues()
    {

        return self::with('configValue')->order('weigh asc')->select();
    }

    public function setName($name)
    {
        $this->table = $name;
        return $this;
    }

}